package es.castorm.arch.validation.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;

@Configuration
public class ValidationConfig {

	@Bean
	public MethodValidationPostProcessor methodValidationPostProcessor() {
		MethodValidationPostProcessor methodValidationPostProcessor = new MethodValidationPostProcessor();
//		methodValidationPostProcessor.setValidatorFactory(validator());
		return methodValidationPostProcessor;
	}

	// @Bean
	// public LocalValidatorFactoryBean validator() {
	// LocalValidatorFactoryBean validator = new LocalValidatorFactoryBean();
	// validator.setProviderClass(ApacheValidationProvider.class);
	// // validator.setProviderClass(HibernateValidator.class);
	// return validator;
	// }
}
